package com.xwli.jdk8new.lambda.test;

import java.util.concurrent.ExecutionException;

/**
 * @program: springcloud
 * @description: lambda表达式测试类
 * @author: xwli
 * @create: 2022-03-12 14:48
 **/
public class LambdaDemo01 {

    public static void main(String[] args) throws ExecutionException, InterruptedException{
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("开始执行匿名内部类线程的任务！！！");
            }
        }).start();
        /*
            Lambda语法规则:
            (参数类型 参数名称)->{
                代码体
            }
         */
        new Thread(()->{System.out.println("开始执行Lambda写法线程的任务！！！");}).start();
    }
}
